package org.jeecg.modules.system.service.impl;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.jeecg.modules.system.entity.SysDepartPosition;
import org.jeecg.modules.system.entity.SysPosition;
import org.jeecg.modules.system.mapper.SysDepartPositionMapper;
import org.jeecg.modules.system.service.ISysDepartPositionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 部门-职位
 * @Author: jeecg-boot
 * @Date:   2019-09-20
 * @Version: V1.0
 */
@Service
public class SysDepartPositionServiceImpl extends ServiceImpl<SysDepartPositionMapper, SysDepartPosition> implements ISysDepartPositionService {

    @Autowired
    private SysDepartPositionMapper sysDepartPositionMapper;

    @Override
    public List<SysDepartPosition> findPage(IPage<SysDepartPosition> page, SysDepartPosition sysDepartPosition) {
        return sysDepartPositionMapper.findPage(page,sysDepartPosition);
    }

    @Override
    public List<SysDepartPosition> findPositionListByDepartId(String departId) {
        return sysDepartPositionMapper.findPositionListByDepartId(departId);
    }

    @Override
    public List<SysDepartPosition> selectPositionList(List<String> departPositionList) {
        return sysDepartPositionMapper.selectPositionList(departPositionList);
    }

    @Override
    public SysDepartPosition selectById(String receiveAttr) {
        return sysDepartPositionMapper.selectById(receiveAttr);
    }

    @Override
    public List<String> selectBydepartId(String departId) {
        return sysDepartPositionMapper.selectBydepartId(departId);
    }

    @Override
    public void addBatch(SysDepartPosition sysDepartPosition) {
        sysDepartPositionMapper.addBatch(sysDepartPosition);
    }

    @Override
    public String selectPositionName(List<String> positionIdList) {
        return sysDepartPositionMapper.selectPositionName(positionIdList);
    }

    @Override
    public List<SysDepartPosition> findServerPositionListByDepartId(String tenantId, String departId) {
        return sysDepartPositionMapper.findServerPositionListByDepartId(tenantId,departId);
    }

    @Override
    public List<SysPosition> findTenantPositionList(String tenantId) {
        return sysDepartPositionMapper.findTenantPositionList(tenantId);
    }

    @Override
    public List<String> getTenantDepartPosition(String tenantId, String departId) {
        return sysDepartPositionMapper.getTenantDepartPosition(tenantId,departId);
    }

    @Override
    public void saveTenantPositionBatch(SysDepartPosition sysDepartPosition) {
        sysDepartPositionMapper.saveTenantPositionBatch(sysDepartPosition);
    }

    @Override
    public List<SysDepartPosition> findTenantPage(Page<SysDepartPosition> page, SysDepartPosition sysDepartPosition) {
        return sysDepartPositionMapper.findTenantPage(page,sysDepartPosition);
    }

    @Override
    public Integer queryExPosition(String positionId, String departId) {
        return sysDepartPositionMapper.queryExPosition(positionId,departId);
    }

    @Override
    public boolean updateServerById(SysDepartPosition sysDepartPosition) {
        return sysDepartPositionMapper.updateServerById(sysDepartPosition);
    }
}
